package com.vueblog.webapi.service;

import com.vueblog.webapi.entity.BlogEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import com.vueblog.webapi.request.BasePageRequest;
import com.vueblog.webapi.request.CreateOrUpdateBlogRequest;
import com.vueblog.webapi.request.GetBlogInfoByWordRequest;
import com.vueblog.webapi.request.GetBlogInfoPageRequest;
import com.vueblog.webapi.response.BasePageResponse;
import com.vueblog.webapi.response.BaseResponse;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author luosj
 * @since 2021-05-15
 */
public interface IBlogService extends IService<BlogEntity> {

    /**
     * 分页模糊查询博客
     */
    BasePageResponse getBlogInfoPageList(GetBlogInfoPageRequest request);

    /**
     * 获取发布且推荐博客
     */
    BaseResponse getPublishedAndRecommendBlogList();

    /**
     * 根据博客id获取博客
     */
    BaseResponse getBlogByid(Long id);

    /**
     * 根据分类id获取博客
     */
    BasePageResponse getBlogByTypeId(BasePageRequest request, Long id);

    /**
     * 根据标签id获取博客
     */
    BasePageResponse getBlogByTagId(BasePageRequest request, Long id);

    /**
     * 博客归档
     */
    BaseResponse archiveBlog();

    /**
     * 创建博客
     */
    BaseResponse createBlog(CreateOrUpdateBlogRequest request);

    /**
     * 编辑博客
     */
    BaseResponse updateBlogInfo(CreateOrUpdateBlogRequest request, String id);

    /**
     * 删除博客
     */
    BaseResponse deleteBlogInfo(String id);

    /**
     * 根据关键字获取博客
     */
    BasePageResponse getBlogByWord(GetBlogInfoByWordRequest request);
}
